package com.yonyougov.devops.cruxcisupport.harborhis;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yonyougov.devops.cruxcisupport.util.CruxDevOpsIdGenerator;
import com.yonyougov.devops.fwc.core.entity.BasicEntity;
import com.yonyougov.devops.fwc.core.id.IdGenerator;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;

/***
 * t_harbor_his
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class HarborHisEntity extends BasicEntity implements Serializable {

    /***
     * 主键
     */
    private BigInteger id;

    /***
     * 项目名称
     */
    private String projectName;

    /***
     * 仓库名称
     */
    private String repositoryName;

    /***
     * 操作人
     */
    private String operator;

    /***
     * 操作类型：1，新增，2：更新，3:删除
     */
    private Integer operatorType;

    /***
     * 操作时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm",timezone = "GMT+8")
    private Date operatorTime;

    /***
     * 镜像版本标签
     */
    private String imageVersion;
    //<!--用户自定义代码开始-->
    public IdGenerator idGenerator() {
        return new CruxDevOpsIdGenerator();
    }
    //<!--用户自定义代码结束-->
}
